package com.victualler.business.customer.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.victualler.core.base.dao.BaseOrderDao;
import com.victualler.core.common.annotation.InitEditColumn;
import com.victualler.core.common.annotation.ListShowColumn;
import com.victualler.core.common.enums.ColumnFormatEnum;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author Guoshichang
 * @since 15:58 on 2018/10/5.
 * @Function 库存变更单表 记录所有商品库存内容变动的轨迹信息 视角以库存管理员/仓库 为主维度  发起的相关操作 , 包括入库确认 , 出库确认等
 *          只有此单审核通过才会发生实际的商品库存的变更
 */
@Entity
@Table(name="pre_customer_order")
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class PreCustomerOrderDao extends BaseOrderDao implements Serializable {

    /**关联前置单号 */
    @ListShowColumn(title = "订单号",sort = 1,type = ColumnFormatEnum.LINK)
    @InitEditColumn(title = "订单号",sort = 1,canEdit = false,required = false)
    public String orderNo;
    /**用户id*/
    private Long customerId;

    /**用户名称*/
    @ListShowColumn(title = "客户名",sort = 2)
    private String customerName;
    /**配送地址id*/
    private Long customerAddressId;
    /**联系人*/
    @ListShowColumn(title = "联系人",sort = 2)
    private String sendName;
    /**联系电话*/
    @ListShowColumn(title = "联系电话",sort = 2)
    private String sendPhone;
    /**配送地址*/
    @ListShowColumn(title = "配送地址",sort = 2)
    private String sendAddress;

    /**配送类型*/
    @ListShowColumn(title = "配送方式",sort = 3,type = ColumnFormatEnum.DICT,dictCodeType = "SendType")
    @InitEditColumn(title = "配送方式",sort = 3,type = ColumnFormatEnum.DICT,dictCodeType = "SendType")
    private String sendType;

    /**订单总量*/
    @ListShowColumn(title = "报货总量",sort = 4)
    @InitEditColumn(title = "报货总量",sort = 4,canEdit = false)
    private BigDecimal sumQuantity;
    /**备注*/
    @ListShowColumn(title = "备注信息",sort = 5)
    @InitEditColumn(title = "备注信息",sort = 5)
    private String reason;



    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public BigDecimal getSumQuantity() {
        return sumQuantity;
    }

    public void setSumQuantity(BigDecimal sumQuantity) {
        this.sumQuantity = sumQuantity;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }


    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public String getCustomerName() {
        return customerName;
    }

    public void setCustomerName(String customerName) {
        this.customerName = customerName;
    }

    public Long getCustomerAddressId() {
        return customerAddressId;
    }

    public void setCustomerAddressId(Long customerAddressId) {
        this.customerAddressId = customerAddressId;
    }

    public String getSendName() {
        return sendName;
    }

    public void setSendName(String sendName) {
        this.sendName = sendName;
    }

    public String getSendPhone() {
        return sendPhone;
    }

    public void setSendPhone(String sendPhone) {
        this.sendPhone = sendPhone;
    }

    public String getSendAddress() {
        return sendAddress;
    }

    public void setSendAddress(String sendAddress) {
        this.sendAddress = sendAddress;
    }

    public String getSendType() {
        return sendType;
    }

    public void setSendType(String sendType) {
        this.sendType = sendType;
    }
}
